import moment from 'moment'
const formatDate = time => {
  if (time == '' || !time) {
    return '——'
  } else {
    var date = moment(time).format('YYYY-MM-DD');
    return date;
  }
}

const formatDateTime = time => {
  if (time == '' || !time) {
    return '——'
  } else {
    var date = moment(time).format('YYYY-MM-DD HH:MM');
    return date;
  }
}

export { formatDate,formatDateTime }